package seekting.demo2017.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;

/**
 * Created by Administrator on 2017/9/16.
 */

public class StatusBarInputActivity extends AppCompatActivity {
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE); //设置无标题
//        getWindow().setFlags(WindowManager.LayoutParams.FILL_PARENT, WindowManager.LayoutParams.FILL_PARENT);
        EditText editText = new EditText(this);
        editText.setText("xxx");
        ScrollView scrollView = new ScrollView(this);
        LinearLayout linearLayout = new LinearLayout(this) {
            @Override
            protected void onLayout(boolean changed, int l, int t, int r, int b) {
                super.onLayout(changed, l, t, r, b);
                Log.d("seekting", "StatusBarInputActivity.onLayout()" + t);
            }
        };


//        linearLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        Button btn = new Button(this);
        btn.setText("actionbar");

        linearLayout.addView(btn, -1, 800);
        linearLayout.addView(editText);
        scrollView.addView(linearLayout);
        scrollView.setFitsSystemWindows(true);

        setContentView(scrollView);

    }
}
